﻿using System;
using System.Collections.Generic;
using System.Configuration;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OgilvyOne.BLL;
using System.Data;


public partial class allergy_plan_plan_content : System.Web.UI.Page
{
    protected string classId;
    protected string columnId;

    protected string titles;
    protected string meta_kwords;
    protected string meta_desc;

    protected string checkseo;
    protected string h1name;
    protected string DomainName;


    protected void Page_Load(object sender, EventArgs e)
    {
        DomainName = ConfigurationSettings.AppSettings["DomainName"];
        

        classId = Request["classId"];
        columnId = Request["columnId"];
        string artId = Request["artId"];
        if(classId=="204"&&columnId=="208"&&artId=="127")
        {
            h1name = "尘螨过敏";
        }
        if (classId == "204" && columnId == "209" && artId == "64")
        {
            h1name = "蛋白质过敏";
        }
        if (classId == "204" && columnId == "207" && artId == "61")
        {
            h1name = "过敏反应";
        }

        DataTable checkdt = BLLArticleInfo.selArticle(artId);
        foreach (DataRow row in checkdt.Rows)
        {
            checkseo = row["isstaticpub"].ToString();
            if (checkseo == "1")
            {
                titles = row["ARTICLETITLE"].ToString();
                meta_kwords = row["ARTICLEKEYWORD"].ToString();
                meta_desc = row["ARTICLEDESC"].ToString();
            }
            else
            {
                DataTable seodt = BLLArticleInfo.getSeoInfo(columnId);
                foreach (DataRow seorow in seodt.Rows)
                {
                    titles = seorow["Columntitle"].ToString();
                    meta_kwords = seorow["ColumnKeyword"].ToString();
                    meta_desc = seorow["ColumnDesc"].ToString();
                }
            }

        }




        //导航
        //1级栏目名
        DataTable dtclass = BLLArticleInfo.getColumnName(classId);
        this.classNm_rpt.DataSource = dtclass;
        this.classNm_rpt.DataBind();

        //导航
        //2级栏目名
        DataTable dtcolumn = BLLArticleInfo.getColumnName(columnId);
        this.columnName_rpt.DataSource = dtcolumn;
        this.columnName_rpt.DataBind();


        ////文章名称
        DataTable dtArticleNm = BLLArticleInfo.GetArticleContent(columnId, artId);
        this.AticleName_rpt.DataSource = dtArticleNm;
        this.AticleName_rpt.DataBind();
        //文章内容
        DataTable dtc = BLLArticleInfo.GetArticleContent(columnId, artId);
        this.content_rpt.DataSource = dtc;
        this.content_rpt.DataBind();
        //更多文章推荐
        DataTable dtr = BLLArticleInfo.GetRecommend(columnId);
        this.Recommend.DataSource = dtr;
        this.Recommend.DataBind();
        //妈妈要知道
        this.doKnow_rpt.DataSource = BLLArticleInfo.selectc("5", "doKnow", "1");
        this.doKnow_rpt.DataBind();

        //banner 你知道吗
        this.banner_rpt.DataSource = BLLArticleInfo.selectc("isbanner", "1");
        this.banner_rpt.DataBind();

    }
}
